﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
 
using System.Text;
using System.Windows.Forms;
using FarPoint.Win.Spread.CellType;

namespace Demo
{
    public partial class Zoom : DemoBaseUserControl
    {
        public Zoom()
        {
            InitializeComponent();
            this.Title = "多视图及缩放";
            this.Description = "Spread .NET  提供“多视图”和“缩放”。“多视图”功能可以把当前表单分成多个视图显示，方便用户对表单不同区域对比。“缩放”功能你可以使用 Ctrl 键并滚动鼠标滚轮来缩放控件。也可以用代码控制缩放。缩放比例在400%和10%之间。";
        }

        private void Zoom_Load(object sender, System.EventArgs e)
        {
            FpSpread1.DataSource = 销售明细表TableAdapter.GetData();
            this.trackBar1.Value = 100;
            FpSpread1.AddViewport(0, 0, 0);

        }
        private void trackBar1_Scroll(object sender, EventArgs e)
        {
            FpSpread1.ZoomFactor = (float)this.trackBar1.Value/100;
        }
    }
}
